package ${packageName}.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;



<#list fieldTypes as t>
<#if t == "BigDecimal">
import java.math.BigDecimal;
<#elseif t != "String" && t !="Integer" && t !="Long" && t !="Double" && t!="Text">
import java.util.${t};
</#if>

</#list>

import java.io.Serializable;

/**
* (${entityName})实体类
*
* @author makejava
* @since 2024-01-12 14:51:54
*/
@Data
@TableName("${tableName}")
@Accessors(chain = true)
public class ${entityName} implements Serializable {
private static final long serialVersionUID = -43316718241889750L;

<#list fields as f>
    /**
    * ${f.fieldDescribe}
    */
    <#if f.fieldName == "id">
    @TableId(type = IdType.ASSIGN_ID)
    </#if>
    <#if f.fieldName == "createTime"||f.fieldName =="createBy">
    @TableField(fill = FieldFill.INSERT)
    </#if>
    <#if f.fieldName == "updateTime" ||f.fieldName =="updateBy">
    @TableField(fill = FieldFill.UPDATE)
    </#if>
    @ApiModelProperty(value = "${f.fieldDescribe}")
    <#if f.fieldType == "Date">
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    </#if>
    private <#if f.fieldType=="Text">String<#else>${f.fieldType}</#if> ${f.fieldName};

</#list>
}

